Fix issue ref migration#11419
Conversation
Signed-off-by: kolaente <k@knt.li>
|
My gitea instance works after running this in the mysql console, but I'm not sure if the changes it made to the db are the ones they're supposed to do. How can I verify that? cc @SijmenSchoon |
|
I now have entries like |
|
How do the tests fail on this one |
|
Also the thing that fails is a utf 8 conversion test that has absolutly nothing to do with database... how... |
|
make lg-tm work |
|
SQLite uses || for concatenation as does Postgres |
|
Postgres can use CONCAT too |
|
|
(In the future) it would probably be worth it to just load the records, fix the strings in go, then update them to avoid exceptions for different database types and potential breakage. Examples: https://github.com/go-gitea/gitea/blob/master/models/migrations/v114.go |
|
I thought XORM was supposed to convert || to CONCAT for MySQL. At least I'm fairly sure it did, when I initially wrote the migration 😅
|
|
@mrsdizzie that would make it so much slower for large databases |
The migration introduced in go-gitea#8742 breaks mysql installations. This pr fixes that by correctly using CONCAT. Signed-off-by: kolaente <k@knt.li>
The migration introduced in #8742 breaks mysql installations. This pr fixes that by correctly using
CONCAT.